Mobile
Log In Sign Up
Home > english-chinese > "defensive copy" in Chinese

Chinese translation for "defensive copy"

保护性拷贝

Related Translations:
defensive industry:  防御性行业
defensive wall:  防守人墙阿人墙,防守人墙雉堞墙
defensive purchase:  防务采购
defensive coping:  防卫性应对
defensive offensive:  防御攻势
defensive quality:  防御能力
defensive publication:  防卫性公告
defensive power:  防御力
defensive stock:  防卫性股
defensive foodball:  防守型足球战术
Example Sentences:
1.Prudence would dictate that defensive copies are needed when calling them , too
谨慎的做法是,在调用存取器方法时也使用防御性副本。
2.You must also be prepared to accept the performance overhead of making defensive copies where necessary
您还要准备着接受在必要时创建防御副本的性能开销。
3.And in the absence of clear documentation , you must make defensive copies on both sides of a method call
而缺乏清楚的文档说明时,您必须在方法调用的两边都创建防御副本。
4.Accessors for immutable properties will always have value semantics and do not need the defensive copying on either side of the call , making them more efficient
不可变属性的存取器将总是具有值引用,因而调用的任何一方都不需要防御性复制,这使得它们效率更高。
5.Every time an object on the screen moved even the mouse probably seemed daunting at the time , and the overhead of making defensive copies probably seemed out of the question . in hindsight , the decision to make
那时,每当一个对象(甚至是鼠标)在屏幕上移动就创建一个新的point的对象创建开销可能有些让人生畏,而创建防御性副本的开销则不在话下。
6.In the absence of clear documentation or a leap of faith , defensive copying is required on both sides of a method call - by the caller , because it doesn t know if the callee will rudely mutate the
由于缺乏清晰的文档说明(或者缺少信任) ,在方法调用的两边都需要创建防御副本调用者需要这样做是因为它不知道被调用者是否会粗暴地改变point ,而被调用者需要这样做是因为它不知道是否保留了对point的引用。
7.While the justification for mutability is often based on performance , because there is no need to create a new object every time its state changes , the performance cost of defensive copying can easily outweigh the performance savings from reduced object creation
认为可变性更合理是基于性能方面的考虑,因为不需要在每次状态改变时都创建一个新对象,然而,由防御性复制所招致的性能代价能轻而易举地抵消掉因为减少了对象创建而节省下来的性能。
8.Given that so few classes actually include such documentation , the safe strategy when calling a method that doesn t document its call semantics or side - effect behavior is to create a defensive copy before passing it to any such method . ironically , the performance benefit of the decision to make
因为很少有类真正包含这样的文档,所以在调用一个没有用文档说明其调用语义或副作用行为的方法时,安全的策略是在传递它到任何这样的方法之前创建一份防御副本。
9.Is called defensive copying , and despite the obvious performance cost , you should get in the habit of using it nearly all the time when returning or storing references to mutable objects or arrays , especially if you are writing a general - purpose facility that may be called by code that you haven t personally written and often even then
Getlocation和setlocation的版本3所使用的技术叫做防御性复制( defensive copying ) ,尽管存在着明显的性能上的代价,您也应该养成这样的习惯,即几乎每次返回和存储对可变对象或数组的引用时都使用这一技术,尤其是在您编写一个通用的可能被不是您自己编写的代码调用(事实上这很常见)的工具时更是如此。
10.There may be a cost to making defensive copies when passing an array reference to another class , but unless you are sure that the other class either makes its own copy or that it will not hold the reference for longer than the duration of the call , you probably want to make a copy before passing the array
当传递一个数组引用到另一个类时,可能有创建防御副本的代价,除非您能确保其他类要么创建了它自己的副本,要么只在调用期间保存引用,否则您可能需要在传递数组之前创建副本。
Similar Words:
"defensive circle" Chinese translation, "defensive conditioned reflex" Chinese translation, "defensive conditionedreflex" Chinese translation, "defensive conditioning reflex" Chinese translation, "defensive coping" Chinese translation, "defensive dribble" Chinese translation, "defensive driving strategies" Chinese translation, "defensive electronics" Chinese translation, "defensive end" Chinese translation, "defensive energy" Chinese translation